<?php
/********************************************************
 *
 * 此文件的作用:
 *		公告表的入口
 *
 * @copyright Copyright (c) 2008-2009
 * @author 刘昌功 lcg635@126.com
 *
 ********************************************************/
defined('APP_DIR') or die('404 Not Found');

FLEA::loadClass('Common_Table');

class Table_FamilyEdu extends Common_Table {
    var $tableName = 'familyEdu';
    var $primaryKey = 'familyEdu_id';
    
    var $belongsTo = array(
    	'tableClass' => 'Table_Householder',
    	'foreignKey' => 'householder_id',
    	'mappingName' => 'householder',
    	'enbled' => false
    );

	function form($data = null) {
		$this->_ui = FLEA::initWebControls();
		$form = array(
			'title' => $this->_ui->control('Textbox', 'title',
				array(
					'value' => $data['title'],
					'required' => 'true',
					'style' => 'width:600px',
					'showName' => '业务名称'
				),
				true
			),
			'student' => $this->_ui->control('Memo', 'student',
   				array(
   					'style' => 'width:600px',
					'showName' => '学生情况'
    			),
				true
			),
			'time' => $this->_ui->control('Textbox', 'time',
   				array(
					'required' => 'true',
					'style' => 'width:600px',
					'showName' => '授课时间'
    			),
				true
			),
			'order' => $this->_ui->control('Memo', 'order',
   				array(
					'required' => 'true',
					'style' => 'width:600px',
					'showName' => '教员要求'
    			),
				true
			),
			'address' => $this->_ui->control('Memo', 'address',
   				array(
					'required' => 'true',
					'style' => 'width:600px',
					'showName' => '授课地点'
    			),
				true
			),
			'path' => $this->_ui->control('Textbox', 'path',
   				array(
					'required' => 'true',
					'style' => 'width:600px',
					'showName' => '到达方式'
    			),
				true
			),
			'order' => $this->_ui->control('Memo', 'order',
   				array(
					'style' => 'width:600px',
					'showName' => '教员要求'
    			),
				true
			),
			'pay' => $this->_ui->control('Textbox', 'pay',
   				array(
					'required' => 'true',
					'style' => 'width:600px',
					'showName' => '预定报酬'
    			),
				true
			),
			'memo' => $this->_ui->control('Memo', 'memo',
   				array(
   					'style' => 'width:600px',
					'showName' => '备注'
    			),
				true
			),
			'registrant' => $this->_ui->control('Textbox', 'registrant',
   				array(
   					'style' => 'width:200px',
					'showName' => '登记人'
    			),
				true
			),
			'finish' => $this->_ui->control('Textbox', 'finish',
   				array(
   					'style' => 'width:200px',
					'showName' => '截止日期'
    			),
				true
			),
			'charge' => $this->_ui->control('Checkbox', 'charge',
   				array(
					'showName' => '付费情况'
    			),
				true
			)
		);
		return $form;
	}
}
